package com.yyysj.friend.controller;

import com.yyysj.common.core.domain.Result;
import com.yyysj.friend.service.ICommentService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

@RestController
@RequiredArgsConstructor
@RequestMapping("/comments")
public class CommentController {

    private final ICommentService commentService;

    @PostMapping("/{postId}")
    public Result<String> add(@PathVariable Long postId,  @RequestBody String content) {
        return Result.ok(commentService.add(postId, content));
    }
}
